package com.bjpowernode.springboot.controller;

import com.bjpowernode.springboot.config.School;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class MyController {

    /*@Value("${school.name}")
    private String schoolName;*/

    @Autowired
    private School school;

    @RequestMapping(value = "/some.do")
    @ResponseBody
    public String say(){
        return "hello springboot" + school.getName();
    }
}
